<script>
import {ref} from 'vue'
import Hello from './Hello.vue'
export default {
  setup() {
    let count = ref(0)
    const increment = () => count.value++
    const decrement = () => count.value--
    return {
      count,
      increment,
      decrement
    };
  },
  render() {
    // return <div>hello the world</div>;
    // console.log(this.increment);
    return (
      <div>
        <button onClick={this.increment}>+1</button>
        <button onClick={this.decrement}>-1</button>
        <h2>当前计数器的值:{this.count}</h2>
        <Hello>
        {{default:props => <button>我是按钮</button>}}
        </Hello>
      </div>
    );
  },
};
</script>

<style lang="scss" scoped>
</style>